/************** init.html **************/

function queryDocumentType_documentType(page) {
	sys_loading();
	var parm = $('#queryDocumentTypeForm').serialize() + (page != null ? ('&page=' + page) : '');
	var url = create_url('documentType-query');
	sys_record_parm('documentType',parm);
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_loading_close();
			$('#documentTypeResultList').html(result);
		}
	});
}


function deleteDocumentType_documentType(code) {
	$.Zebra_Dialog('确认要删除信息吗？',{
	'type': 'question',
	'title': '警告' ,
	'buttons':[
	           {caption:'确认',callback:function() {
					var url = create_url('documentType-delete');
					var parm = {'code':code};
					sys_submiting();
					$.ajax({type:'POST', url:url, data:parm,
						success: function(result) {
							sys_submiting_close();
							queryDocumentType_documentType();
					}
					})}},
	           {caption:'取消',callback:function(){}}
				]
	});
}

function saveDocumentType_documentType() {
	var parm = $('#editDocumentTypeForm').serialize();
	var url = create_url('documentType-save');
	sys_submiting();
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_submiting_close();
			if (result == 'success') {
				sys_load_handle('documentType');
			} else {
				$.Zebra_Dialog('操作失败!');
			}
		}
	});
}